home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / share / pmi / stop-applications.sh < prev   
Linux/UNIX/POSIX Shell Script  |  2008-01-15  |  344b  |  18 lines

  1. #!/bin/bash
  2.  
  3. # Walk a directory, assembling a list of services that need to be stopped
  4. # Returns a string
  5.  
  6. . /etc/default/pmi
  7.  
  8. if [ ! -d $STOPDIR ]; then
  9.         echo "No such directory $STOPTDIR, exiting" >&2
  10.         exit 1
  11. fi
  12.  
  13. for file in $(find $STOPDIR -type f -print "%p "); do
  14.         STOPLIST="$STOPLIST "$(<$file);
  15. done
  16.  
  17. echo $STOPLIST
  18.